﻿<script id="editMailboxTmpl" type="text/x-jquery-tmpl">
    <div id="mail_server_edit_mailbox">
        <table>
            <tbody>
                <tr>
                    <td>
                        <div class="block-cnt-splitter header-address">
                            <div class="bold">${ASC.Mail.Resources.MailAdministrationResource.MailboxAddressLabel}:</div>
                            <div>${mailbox.address.email}</div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div id="mailboxSenderName" class="block-cnt-splitter">
                            <div class="headerPanelSmall bold">${ASC.Mail.Resources.MailAdministrationResource.SenderNameLabel}</div>
                            <input type="text" class="senderName textEdit" maxlength="255" value="${mailbox.name}"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div id="mailbox_add_alias" class="requiredField">
                            <span class="requiredErrorText">${ASC.Mail.Resources.MailScriptResource.ErrorEmptyField}</span>
                            <div class="headerPanelSmall bold">${ASC.Mail.Resources.MailAdministrationResource.MailboxAliasLabel}</div>
                            <table class="aliasTable">
                                <tbody>
                                    <tr>
                                        <td class="aliasNameBlock">
                                            <input type="text" class="aliasName textEdit" maxlength="64" autofocus/>
                                        </td>
                                        <td class="domainNameBlock">
                                            <span class="domainName" title="${domain.name}">@${domain.name}</span>
                                            <a class="plus plusmail addAlias" title="${ASC.Mail.Resources.MailAdministrationResource.AddButton}"></a>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <div class="mailbox_aliases webkit-scrollbar">
                                <table>
                                    {{tmpl(mailbox.aliases) "mailboxAliasTableRowTmpl"}}
                                </table>
                            </div>
                        </div>

                    </td>
                </tr>
            </tbody>
        </table>
        <div class="buttons">
            <button class="button middle blue save" type="button">${ASC.Mail.Resources.MailResource.SaveBtnLabel}</button>
            <button class="button middle gray cancel" type="button">${ASC.Mail.Resources.MailScriptResource.CancelBtnLabel}</button>
        </div>
    </div>
</script>

<script id="mailboxAliasTableRowTmpl" type="text/x-jquery-tmpl">
    <tr class='alias_row' alias_id="${id}">
        <td class="mailbox_address_column">
            <span class="alias_address">${email}</span>
        </td>
        <td class="delete_entity_column">
            <div class="delete_entity"></div>
        </td>
    </tr>
</script>
